using System;

namespace OpenRay
{
	public class Ray
	{
		public Point Origin {
			get;
			private set;
		}
		
		public Vector Direction {
			get;
			private set;
		}
		
		public Ray ( Point o, Vector d )
		{
			Origin = new Point(o);
			Direction = new Vector( d );
		}
		
		public Ray ( Ray r )
		{
			Origin = new Point( r.Origin );
			Direction = new Vector( r.Direction );
		}
		
		public static Ray operator * ( Matrix m, Ray r ) 
		{
			return new Ray( m * r.Origin, m * r.Direction );
		}
	}
}

